<%@ page import="com.suptrack.entity.*" %>
<% 
boolean Tlog =false;
boolean log =true;
String contextPath = getServletContext().getContextPath();

HttpSession Session= request.getSession();
User user =(User) Session.getAttribute("User");
if( user==null  ){
	log=false;
	
}
else{
	
		if (user.isAccType() ==true){
		Tlog=true;
	}
}


%>

<nav>
<div id="templatemo_home_page">
  <div class="templatemo_topbar">
    <div class="container">
      <div class="row">
        <div class="templatemo_titlewrapper"><img src="/SupTrack/images/templatemo_logobg.png" alt="logo background">
          <div class="templatemo_title"><span>SupTracking</span></div>
        </div>
        <div class="clear"></div>
        <div class="templatemo_titlewrappersmall">SupTracking</div>
        <nav class="navbar navbar-default templatemo_menu" role="navigation">
          <div class="container-fluid"> 
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
              <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"><span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span></button>
            </div>
            <!-- Collect the nav links, forms, and other content for toggling -->
            <div id="top-menu">
              <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav">
                  <li><a class="menu" href="<%= contextPath %>/index">Accueil</a></li>
                  <% if(log) { %>
		<li><a class="menu" href="#">Bonjour  : ${User.firstName}</a></li>
		<li><a class="menu" href="<%= contextPath %>/RegisteredContent/ManageCar">Manage Cars</a></li>
		<li><a class="menu" href="<%= contextPath %>/RegisteredContent/ManageZone">Manage Zone</a></li>
		<li><a class="menu" href="<%= contextPath %>/RegisteredContent/ManageUser">User Profil</a></li>
		<li><a class="menu" href="<%= contextPath %>/logout">Logout</a></li>

		<% if(Tlog) { %>
		<li><a class="menu" href="<%= contextPath %>/RegisteredContent/Admin/AdminPanel">AdminPanel</a></li>
		<% } %>
		
		<% } else { %>

	<li><a class="menu" href="<%= contextPath %>/login.jsp">Login</a></li>
	<li><a class="menu" href="<%= contextPath %>/register.jsp">Register</a></li>
	<li><a class="menu" href="<%= contextPath %>/offerpage.jsp">OfferPage</a></li>
		

<% } %>
</nav>
</div>
                </ul>
              </div>
            </div>
            <!-- /.navbar-collapse --> 
          </div>
          <!-- /.container-fluid --> 
        </nav>
        <div class="clear"></div>
      </div>
    </div>
  </div>

</nav>








